﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SIMS.BL;
using MandalaySoft.Common;

public partial class _Default : System.Web.UI.Page
{
    MyError _error;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            _error = new MyError();
            General.BindSchoolNameList(ddlSchool, string.Empty, true, out _error);
            ddlSchool.Items.Insert(0, new ListItem("Select", "0"));

            if (Session[Global.Session_SchoolID] != null)
            {
                ddlSchool.Text = Session[Global.Session_SchoolID].ToString();
            }
        }
    }

    protected void ddlSchool_SelectedIndexChanged(object sender, EventArgs e)
    {
        if (ddlSchool.Text != "0")
        {
            Session[Global.Session_SchoolID] = ddlSchool.Text;
        }
    }
}
